#include "network.h"



void sendData(const QByteArray &data, QTcpSocket *tcpSocket) {
    if(tcpSocket == NULL){
        return;
    }
    QString head = "~";
    tcpSocket->write(head.toUtf8());
    tcpSocket->write(data);
    tcpSocket->write("\r\n");
    qDebug() << "Data sent:" << data;
}
